<?php
require_once '../core/db_abstract_model.php';
require_once '../proveedor/messages.php';


class Proveedor extends db_abstract_model{
    
    public   $nIdProveedor;
    public   $sDescripcion;
    private  $bActivo;
    private  $dFecha;
    private  $sUsuario;
    private  $sTerminal;

    public function get($nIdPersonal='') {

    }
   
    public function set($depto_data=array()) {
 
   }
    
    public function edit($depto_data=array()) {
      
    }
    
    public function delete($nIdDepartamento=''){

    }
    
    public function getproveedores($param=''){
        $this->query="SELECT nIdProveedor,sDescripcion from SCICProveedor";
        if($param!='')
        $this->query="SELECT nIdProveedor,sDescripcion from SCICProveedor Where nIdProveedor=$param
                      UNION ALL
                      SELECT nIdProveedor,sDescripcion from SCICProveedor where nIdProveedor!=$param";
        $this->get_numqueryresults();
        $resultset=array();
        if (count($this->result_rows)>=1){
            $resultset=$this->result_rows;
        }
        else{
            $this->msj=MSJ_NOPROV_RESULTS;
        }
        return $resultset;
    }
    
    function __construct() {
        $this->db_name='DBSCInterno';
    }
    
    function __destruct() {
        unset($this);
    }
}
?>
